import query from './atom/db/query';

declare const action_id: string;
declare const session_id: string;
declare const spaceid: string;

interface Message {
	filter: {};
	page_size: number;
}

async function atom(msg: Message) {
	const systemid = '6051';
	const { exec, prepare } = query(action_id, session_id, spaceid, systemid);
	prepare('dept', ['_id', 'deptname', 'parent_dept_code', 'parent_dept_name', 'deptid'], msg.filter, msg.page_size, 1);
	const [data] = await exec();
	return data;
}